package com.buba.user.mapper;

import com.buba.pojo.appointment.Appointment;
import com.buba.pojo.other.DivisionType;
import com.buba.pojo.other.Drugs;
import com.buba.pojo.other.MedicalRecords;
import com.buba.pojo.other.SetMeal;
import com.buba.pojo.record.*;
import com.buba.pojo.user.Campus;
import com.buba.pojo.user.Doctor;
import com.buba.pojo.user.ThePatient;
import com.buba.pojo.user.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.buba.user.vo.AppointmentVo;
import com.buba.user.vo.MedicalAppointmentVo;
import com.buba.user.vo.NucleicAcidVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.PageRequest;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2022-06-09
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    //登录
    User login(String userName);

    //添加密码
    void insertToken(@Param("token") String token, @Param("loginUser") String loginUser, @Param("date") Date date);

    List<AppointmentVo> getAllappointment(@Param("doctorName") String doctorName,@Param("name")String name,@Param("createTime")Date createTime,@Param("createTime1")Date createTime1 ,@Param("divisionName")String divisionName);

    AppointmentVo getByIdappointment(Integer id);

    Doctor getByIdDoctor(Integer doctorId);

    ThePatient getByIdThePatient(Integer patientId);

    DivisionType getByIdDivisionType(Integer departmentId);

    Campus getByidCampus(Integer campusId);

    WaitingRecord getByIdWaitingRecord(Integer houzhenId);


    List<NucleicAcidVo> getAllnucleicAcid(@Param("createTime")Date createTime,@Param("createTime1")Date createTime1);

    NucleicAcidVo getByIdnucleicacid(Integer id);

    ThePatient getByIdThePatient1(Integer patientId);

    WaitingRecord getByIdWaitingRecord1(Integer houzhenId);

    DivisionType getByIdDivisionType1(Integer departmentId);

    Campus getByidCampus1(Integer campusId);

    Doctor getByIdDoctor1(Integer doctorId);

    List<MedicalAppointmentVo> getAllmedicalAppointment(@Param("createTime")Date createTime,@Param("createTime1")Date createTime1);

    MedicalAppointmentVo getByIdmedicalAppointment(Integer id);

    ThePatient getByIdThePatient2(Integer patientId);

    SetMeal getBiIdsetMeal(Integer packageId);

    Campus getByidCampus2(Integer campusId);

    DivisionType getByIdDivisionType2(Integer departmentId);

    PhysicalReport getByIdPhysicalReport(Integer patientId);

    Convention getAllconvention(Integer patientId);

    BloodRoutineExaminatio getAllbloodRoutineExaminatio(Integer patientId);

    List<MedicalAppointmentVo> getAllrecord();

    List<Drugs> getAlldrugs();


    Drugs getByIddrugs(Integer id);


}
